﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Data;
using CUREBusinessLogicLayer;

namespace CURE.Handler
{
    public class JudgeAuthority
    {
        LoginBLL loginbll = new LoginBLL();
        public bool JudgeUserAuthorityByGroupId(string url)
        {
            bool judge = false;
            string groupid = string.Empty;
            if (HttpContext.Current.Request.Cookies["MWS_User"] != null)
            {
                groupid = HttpContext.Current.Request.Cookies["MWS_User"]["GROUP_ID"];
                Dictionary<string, object> dic = new Dictionary<string, object>();
                dic.Add("groupid", groupid);
                dic.Add("url", url);
                judge = loginbll.JudgeAuthorityByGroupID(dic);
            }
            else
            {
                judge = false;
            }
            return judge;
        }
    }
}